package com.example.recycler.clipchildren;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {
    private ListView mListView;
   private ActivityMainAdapter mAdapter;
//      List<String> mStrings=new ArrayList<>();
//    private ArrayAdapter mAdapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mListView= (ListView) findViewById(R.id.listView);
        mAdapter=new ActivityMainAdapter(this);
//        mAdapter=new ArrayAdapter(this,R.layout.tv,mStrings);

        mListView.setAdapter(mAdapter);
        mListView.setOnItemClickListener(this);

    }

    @Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        Toast.makeText(this, "111111", Toast.LENGTH_SHORT).show();
    }
}
